<!--
 * @Author: liuxin
 * @Description:详情状态图章 version1.0
 使用方式:
 1 引入import imgStatus from "@/components/imgStatus/imgStatus";
  <imgStatus ids="MESS_RECEIVE_MATERIAL_APPLY" :flowStatus="detailInfo.flowStatus"></imgStatus>

-->
<template>
  <div>
    <div class="right" v-if="shows">
      <img
        v-if="flowStatus == 'RUNNING'"
        src="@/assets/img/shenpizhong.png"
        alt=""
        class="rightImg"
      />
      <img
        v-if="flowStatus == 'TERMINATED'"
        src="@/assets/img/yichehui.png"
        alt=""
        class="rightImg"
      />
      <img
        v-if="flowStatus == 'REFUSE'"
        src="@/assets/img/yijujue.png"
        alt=""
        class="rightImg"
      />
      <img
        v-if="flowStatus == 'AGREE'"
        src="@/assets/img/yitongguo.png"
        alt=""
        class="rightImg"
      />
    </div>
  </div>
</template>
<script>
import { getEnableOne } from "@/api/api";
export default {
  props: {
    flowStatus: {
      type: String,
      default: "",
    }, //状态值
    // 控制是否开启审批流程
    ids: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      shows: true,
    };
  },
  created() {
    if (this.ids) {
      getEnableOne({ id: this.ids, type: "add" }).then((res) => {
        if (res.result && res.result == "false") {
          this.shows = false;
        } else {
          this.shows = true;
        }
      });
    }
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.right {
  width: 0.6rem;
  .rightImg {
    display: block;
    width: 0.55rem;
    height: 0.55rem;
  }
}
</style>
